﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Qiang.Data;

namespace Qiang.Styles
{
    public class Selection : ISelection
    {

        #region 初始化

        /// <summary>
        /// 
        /// </summary>
        public Selection()
        {
            Configure();
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="dataset"></param>
        public Selection(IDataset dataset)
        {
            this._parentDataset = dataset;
            
        }


        void Configure()
        {
            
        }


        #endregion


        #region 字段

        IDataset _parentDataset;
       

        #endregion


        #region 属性

        /// <summary>
        /// 
        /// </summary>
        public IDataset ParentDataset
        {
            get
            {
                return _parentDataset;
            }
        }
                
        /// <summary>
        /// 
        /// </summary>
        public IExtent Extent
        {
            get
            {
                return GetExtent();
            }
        }
              

        #endregion


        #region 方法

        /// <summary>
        /// 
        /// </summary>
        /// <param name="Region"></param>
        public virtual void Select(IExtent Region)
        {
        }     

        /// <summary>
        /// 
        /// </summary>
        /// <param name="Region"></param>
        /// <param name="Type"></param>
        public virtual void Select(IExtent Region, SelectionMode Mode)
        { 
        }
       
        /// <summary>
        /// 清空
        /// </summary>
        public virtual void Clear()
        { 
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="shp"></param>
        /// <returns></returns>
        public virtual bool Contains(IShape shp)
        {
            return false;
        }


        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        protected virtual IExtent GetExtent()
        {
            return new Extent();
        }

        #endregion



    }
}
